﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Evolution;
using Evolution.Structure;
using System.Windows.Input;

namespace GameProject.ViewModel
{
    class EncyclopediaViewViewModel : ViewModelBase
    {
        private MainWindowViewModel mainWindowViewModel;

        public EncyclopediaViewViewModel(MainWindowViewModel mainWindowVM)
        {
            mainWindowViewModel = mainWindowVM;
        }

        public Encyclopedia Encyclopedia
        {
            get
            {
                return GlobalVar.Encyclopdia;
            }
            set
            {
                GlobalVar.Encyclopdia = value;
                onPropertyChanged("Encyclopedia");
            }
        }

        public ICommand OpenGameMenuCommand
        {
            get
            {
                if (_OpenGameMenuCommand == null)
                {
                    _OpenGameMenuCommand = new RelayCommand(param => mainWindowViewModel.OpenGameMenu(), null);
                }
                return _OpenGameMenuCommand;
            }
        }
        private ICommand _OpenGameMenuCommand;
    }
}
